﻿namespace SharePointUtilitiesForDevelopers.Actions
{
    public class ExtractContentTypeAction
    {
        //        var list = (SharePointList)nodeInfo.Tag;

        //// Load list fields
        //if (list.Fields == null)
        //{
        //    _listRepository.LoadListFields(list, _web.Url);
        //}

        //// Show the create content type form
        //var ctForm = new ContentTypeForm();
        //ctForm.Web = _web;
        //ctForm.ContentTypeFields = (from fld in list.Fields
        //                            where (!fld.Hidden) && (!string.IsNullOrEmpty(fld.Id))
        //                            select fld).ToList();

        //ctForm.ContentTypeName = list.Title;
        //ctForm.ContentTypeDescription = list.Description;
        //ctForm.ShowDialog(this);

        //// Create folder
        //var feature = new SharePointFeature();
        //feature.Title = list.Title;
        //feature.Description = list.Description;

        //feature.ElementManifests.Add(new SharePointFeatureElementManifest { Location = list.Title });
        //MessageBox.Show(feature.GetXml());
    }
}